package com.study.concurrent.C_ThreadSynchronizationHelperClass.c_ManyRscourcesConcurrentControl;

/**
 * Created by 赵超 on 2017/3/25.
 */
public class Job implements Runnable {
    private PrintQueue printQueue;

    public Job(PrintQueue printQueue) {
        this.printQueue = printQueue;
    }

    @Override
    public void run() {
        System.out.printf("%s 准备打印\n", Thread.currentThread().getName());
        printQueue.printJob(new Object());
        System.out.printf("%s 打印完毕\n", Thread.currentThread().getName());
    }

}
